﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using VQWEB.administrator.sources;
using VQData;
using VQWEB.common;

namespace VQWEB.administrator.english.excercises
{
    public partial class excercise_view : System.Web.UI.Page
    {
        
        EnglishData EnglishData = new EnglishData();
        eng_excercise excercise = null;
        int Id = 0;
        protected void Page_Load(object sender, EventArgs e)
        {
            if (RouteData.Values["Id"] != null)
                int.TryParse(RouteData.Values["Id"].ToString(), out Id);
            if (Id > 0) { 
                //View Excercise                
                excercise = EnglishData.GetExcerciseById(Id);                
                //excercise.excercise_content = StringHelper.Format(excercise.excercise_content);
                frmExcerciseView.DataSource = new List<eng_excercise> { excercise };
                frmExcerciseView.DataBind();
            }
        }
    }
}